{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "24eb4f0b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2021/10/17 11:23:26 Oct-Sunday\n",
      "请输入您的用户名：dm\n",
      "请输入您的密码：2021\n",
      "\n",
      "欢迎尊贵的会员用户 dm ，成功登录python魔仙堡系统使用~\n",
      "*******进入用户界面*******\n",
      "\n",
      "尊敬的会员用户您好！您现在的课程情况为：\n",
      "难得时刻！\n",
      "终于可以好好休息了~享受下难得的周末吧！\n",
      "😀nice！\n",
      "非会员用户可通过权限，查看5次详细的课表：\n",
      "*******请输入【确切数字】，可查看当天详细课表*******\n",
      "请输入您的选择:789\n",
      "请输入您的选择:987\n",
      "请输入您的选择:1\n",
      "在星期一，您有两门课哦~\n",
      "3-5节 python2实-203\n",
      "10-11节 财务语言5-302\n",
      "尊敬的会员您好，您还有 2 次查询机会，好好珍惜~\n",
      "\n"
     ]
    }
   ],
   "source": [
    "import time  # 获取time板块。\n",
    "import datetime\n",
    "from datetime import datetime  # 从datetime中获取datetime板块。\n",
    "now = datetime.now()\n",
    "print(time.strftime(\"%Y/%m/%d %H:%M:%S %b-%A\", time.localtime()))  # 以”年/月/日 时：分：秒“形式输出当地时间。\n",
    "\n",
    "vip_user = \"dm\"\n",
    "vip_password = \"2021\"\n",
    "con_user = \"789\"\n",
    "con_password = \"987\"\n",
    "\n",
    "count = 3\n",
    "while True:\n",
    "    count -= 1\n",
    "    # 用户输出数据\n",
    "    username = input(\"请输入您的用户名：\")\n",
    "    password = input(\"请输入您的密码：\")\n",
    "    # 1.先判断账号\n",
    "    if vip_user or con_user == username:\n",
    "        if vip_password == password:\n",
    "            print() # 空行，表示美观\n",
    "            print(\"欢迎尊贵的会员用户\", vip_user, \"，成功登录python魔仙堡系统使用~\")\n",
    "\n",
    "            print(\"*******进入用户界面*******\")\n",
    "            print()\n",
    "            print(\"尊敬的会员用户您好！您现在的课程情况为：\")\n",
    "\n",
    "            day = datetime.today().weekday()  # 表示今天的日期\n",
    "            time = datetime.today().hour  # 表示今天日期的时间\n",
    "\n",
    "            week_day = int(day)  # ①可以将一个数转化为整数【且不带参数，直接输出int（），得到的是整数0；②int接受字符串作为参数：类型转换。】\n",
    "            week_time = int(time)\n",
    "\n",
    "            if week_day == 1:\n",
    "                if week_time < 9:\n",
    "                    print(\"好耶！不用上课，赶快睡觉！你个废人~\")\n",
    "                elif week_time > 9 and week_time < 18:\n",
    "                    print(\"今天有两门课哦~滚去上课！\")\n",
    "                    print(\"别拖拉！要上课了！3-5节 python2实-203\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"今天最后一节课哦~滚去上课！\")\n",
    "                    print(\"别拖拉！要上课了！8-10节 财务语言5-302\")\n",
    "                elif week_time > 18:\n",
    "                    print(\"好耶！不用上课！~\")\n",
    "\n",
    "            elif week_day == 2:\n",
    "                if week_time < 12:\n",
    "                    print(\"今天有两门课哦~滚去上课！\")\n",
    "                    print(\"别拖拉！要上课了！4-5节 毛概(实践)9-207\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"今天最后一节课哦~滚去上课！\")\n",
    "                    print(\"别拖拉！要上课了！8-10节 网站运营与管理3实-304\")\n",
    "                if week_time > 18:\n",
    "                    print(\"好耶！不用上课!~\")\n",
    "\n",
    "            elif week_day == 3:\n",
    "                if week_time < 12:\n",
    "                    print(\"今天有三门课哦~滚去上课！\")\n",
    "                    print(\"别拖拉！要上课了！1-2节 体育\")\n",
    "                    print(\"4-5节 大英10-205\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"好耶！不用上课！~\")\n",
    "                if week_time > 18:\n",
    "                    print(\"今天最后一节课哦~滚去上课！\")\n",
    "                    print(\"要上课了！12-14节 创业基础1-402\")\n",
    "\n",
    "            elif week_day == 4:\n",
    "                if week_time < 12:\n",
    "                      print(\"好耶！不用上课！~\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"今天仅仅的一节课哦~滚去上课！\")\n",
    "                    print(\"要上课了！10-11节 资本市场6-106\")\n",
    "                if week_time > 18:\n",
    "                    print(\"好耶！不用上课！~\")\n",
    "\n",
    "            elif week_day == 5:\n",
    "                if week_time < 12:\n",
    "                    print(\"今天有三门课哦~滚去上课！\")\n",
    "                    print(\"要上课了！1-2节 大英10-205\")\n",
    "                    print(\" 4-5节 Ai软件应用 新综612\")\n",
    "                if week_time > 12 and week_time < 18:\n",
    "                    print(\"今天最后一节课哦~滚去上课！\")\n",
    "                    print(\"要上课了！8-10节 毛概（理论）7-402\")\n",
    "                if week_time > 18:\n",
    "                    print(\"好耶！不用上课！~\")\n",
    "\n",
    "            else:\n",
    "                print(\"难得时刻！\")\n",
    "                print(\"终于可以好好休息了~享受下难得的周末吧！\")\n",
    "\n",
    "            # coding=utf-8。Unicode码位的取值范围是0x0——0x10ffff（这是十六进制数），等于十进制数0到1114111，而“Emoji”位于0x1f300——0x1f6ff区域内。\n",
    "            for i in range(0x1f600, 0x1f601):\n",
    "                print(chr(i), end=\"nice！\")\n",
    "                if i % 16 == 15:\n",
    "                    print()\n",
    "\n",
    "            while True:\n",
    "                print()\n",
    "                print(\"\"\"非会员用户可通过权限，查看5次详细的课表：\"\"\")\n",
    "                print(\"*******请输入【确切数字】，可查看当天详细课表*******\")\n",
    "                count = 5\n",
    "                while True:\n",
    "                    count -= 1  # 加在这里也没用\n",
    "                    num = [\"1\", \"2\", \"3\", \"4\", \"5\"]\n",
    "                    num = input(\"请输入您的选择:\")\n",
    "\n",
    "                    if \"1\" in num:\n",
    "                        print(\"在星期一，您有两门课哦~\")\n",
    "                        print(\"3-5节 python2实-203\")\n",
    "                        print(\"10-11节 财务语言5-302\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会，好好珍惜~\")\n",
    "                        print()\n",
    "                    elif \"2\" in num:\n",
    "                        print(\"在星期二，您有两门课哦~\")\n",
    "                        print(\"4-5节 毛概(实践)9-207\")\n",
    "                        print(\"8-10节 网站运营与管理3实-304\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会，好好珍惜~\")\n",
    "                        print()\n",
    "                    elif \"3\" in num:\n",
    "                        print(\"在星期三，您有三门课哦~\")\n",
    "                        print(\"1-2节 体育\")\n",
    "                        print(\"4-5节 大学英语10-205\")\n",
    "                        print(\"12-14节 创业基础1-402\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会，好好珍惜~\")\n",
    "                        print()\n",
    "                    elif \"4\" in num:\n",
    "                        print(\"在星期四，您只有一门课哦~\")\n",
    "                        print(\"10-11节 资本市场6-106\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会，好好珍惜~\")\n",
    "                        print()\n",
    "                    elif \"5\" in num:\n",
    "                        print(\"在星期五，您有三门课哦~\")\n",
    "                        print(\"1-2节 大英 10-205\")\n",
    "                        print(\"4-5节 Ai软件应用 新综612\")\n",
    "                        print(\"8-10节 毛概（理论）7-402\")\n",
    "                        print(\"尊敬的会员您好，您还有\", count, \"次查询机会，好好珍惜~\")\n",
    "                        print()\n",
    "                    if count == 0:\n",
    "                        print(\"对不起！您今日可查询次数已到达上限，请明天再来查询。\")\n",
    "                        break\n",
    "                break\n",
    "            break\n",
    "        else:\n",
    "            if count == 0:\n",
    "                print(\"你都输入了三次了，还不对？傻逼，3分钟再来~\")\n",
    "                break\n",
    "            else:\n",
    "                print(\"您输入的账号或者密码不正确，请重新输入。您还有\", count, \"次机会~加油！\")\n",
    "    else:\n",
    "        if count == 0:\n",
    "            print(\"你都输入了三次了，还不对？傻逼，3分钟再来~\")\n",
    "            break\n",
    "        else:\n",
    "            print(\"您输入的账号或者密码不正确，请重新输入。您还有\", count, \"次机会~加油！\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d1db044f",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
